package com.thinking.project.monitorserver.service;

import com.thinking.project.monitorserver.mapper.DepartmentMapper;
import com.thinking.project.monitorserver.pojo.Department;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @Description 功能描述：
 * @Author tangsixiang@163.com
 * @DATE 2019/6/21 11:27
 * @Version 1.0
 **/

@Service
public class DepmentService    {

    @Resource
    DepartmentMapper mapper;

    public int updateByPrimaryKey(Department record) {
        return mapper.updateById(record);
    }

    public int deleteByPrimaryKey(Integer depId) {
        return mapper.deleteById(depId);
    }

    public int updateByPrimaryKeySelective(Department record) {
        return  mapper.updateById(record);
    }

    public Department selectByPrimaryKey(Integer depId) {
        return mapper.selectById(depId);
    }
    public List<Department> selectForList(Map<String,Object> department) {
        return mapper.selectByMap(department);
    }

    public int insertSelective(Department record) {
        return mapper.insert(record);
    }

    public int insert(Department record) {


        return mapper.insert(record);
    }
}
